<?php
/*--------------------------------------------------------------------
 小微OA系统 - 让工作更轻松快乐

 Copyright (c) 2013 http://www.smeoa.com All rights reserved.

 Author:  jinzhu.yin<smeoa@qq.com>

 Support: https://git.oschina.net/smeoa/xiaowei
 --------------------------------------------------------------*/

namespace Home\Controller;
use Think\Controller;

class ApiController extends Controller {
	protected $config = array('app_type' => 'public');
        
	function check() {
            $package = trim($_REQUEST["package"]);
            $model = M("App");
            $where["is_del"]="0";
            $where['package'] = $package;
            $where["is_lock"] = "0";
            $app = $model -> where($where) -> select();
            if($app){
                $arr = array("status"=>1);
            }else{
                $arr = array("status"=>0);
            }
            echo json_encode($arr);
            die();
	}
}
?>